//
//  BaseTableViewController.swift
//  LXQWB
//
//  Created by 江海天 on 2017/7/3.
//  Copyright © 2017年 江海天. All rights reserved.
//

import UIKit

class BaseTableViewController: UITableViewController {

    	var isLoginView:VisitorView?
	var isLogin = true
	override func loadView() {
		if !isLogin {
			isLoginView = VisitorView.visitorView()
			view = isLoginView!
			navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.plain, target: self, action: #selector(registerClik(sender:)))
			navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登录", style: UIBarButtonItemStyle.plain, target: self, action:#selector(loginClik(sender:)))
			
			isLoginView?.loginBtn.addTarget(self, action: #selector(loginClik(sender:)), for: UIControlEvents.touchDown)
			isLoginView?.registerBtn.addTarget(self, action: #selector(registerClik(sender:)), for: UIControlEvents.touchDown)

			return
		}
		super.loadView()
	}
			
	
	//MARK: - 登陆业务
	///login
	func loginClik(sender: UIButton){
		NLog(message: "")
	}
	func registerClik(sender: UIButton){
		NLog(message: "")
	}
}
